1. Field of the Invention
The present invention relates to an image processing apparatus which can perform quantization processing of a document image including both a character portion and a photograph portion while maintaining high resolution of the character portion and a high gray scale characteristic of the photograph portion.
2. Description of the Prior Art
In general, in an image processing apparatus, such as a document image processing apparatus which can process not only code data but also image data, when image data are read by a reading means such as a scanner. The image data of, e.g., characters, graphs, and the like having a contrast are subjected to simple quantization using a fixed threshold value. Image data of, e.g., photographs having a gray scale are subjected to quantization by a pseudo gray scale means such as a dithering method. The reason why such processing operations are performed is as follows. That is, when read image data are uniformly subjected to simple quantization processing using a fixed threshold value, image quality is not degraded in a character/line region since the resolution is preserved. However, image quality is degraded in a photograph region since the gray scale characteristic cannot be preserved. On the other hand, when read image data are uniformly subjected to gray scale processing by, e.g., a systematic dithering method, image quality is not degraded in a photograph region since the gray scale characteristic can be preserved. However, an image with poor image quality is formed in a character/line region since the resolution is impaired.
As a means for solving such a problem, an "error diffusion method" as a quantization method which can satisfy a gray scale characteristic of a photograph image region, and has a better resolution of a character/line region than the systematic dithering method has been proposed. In this "error diffusion method", as described in the article entitled "An Adaptive Algorithm for Spatial Gray Scale" appearing in the journal "Proceeding of the S.I.D Vol. 17 2 Second Quarter 1976 p.p. 75-77", a product of a quantization error obtained when a pixel of interest is quantized by a given threshold value, and a predetermined weighting coefficient is diffused to non-quantized pixels in a predetermined region around the pixel of interest, and when the non-quantized pixels are quantized, quantization is performed while adding the diffused quantization error as a correction value.
In the "error diffusion method", since quantization processing is performed for a document image including both a character region and a photograph region by the same method, processing according to features of the respective regions cannot be performed. For this reason, when an input image places importance on the gray scale, quantization processing which can sufficiently satisfy the gray scale characteristic can be performed. However, in an image such as a character image which places importance on the resolution rather than the gray scale characteristic, the resolution of a character portion is impaired due to error compensation processing.